import config from '../../assets/js/conf/config';
import { request } from '../../assets/js/utils/request';

//获取商品轮播图数据
export function getSwiper(gid){
    return request(config.baseUrl+"/home/goods/info?gid="+gid+"&type=details&token="+config.token);
}

//获取商品规格属性
export function getGoodsAttr(gid){
    return request(config.baseUrl+"/home/goods/info?gid="+gid+"&type=spec&token="+config.token);
}

//获取商品评价
export function getReviews(gid, page=1){
    return request(config.baseUrl+"/home/reviews/index?gid="+gid+"&page="+page+"&token="+config.token);
}

//获取商品详情内容
export function getGoodsDetails(gid){
    return request(config.baseUrl+"/home/goods/info?gid="+gid+"&type=details&token="+config.token);
}